package net.wangds.persistence.columnoriented;

import net.wangds.log.helper.LogHelper;
import net.wangds.persistence.columnoriented.entity.ColumnOrientedTableDef;
import net.wangds.persistence.columnoriented.repository.db.DictFieldRepo;
import net.wangds.persistence.columnoriented.repository.db.DictTableRepo;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * .
 * <p></p>
 *
 * @author 王东石 2020/10/30 18:09.
 */
@Service
public class ColumnOrientedTableManager implements InitializingBean {

    @Autowired
    private DictFieldRepo repoDctFld;

    @Autowired
    private DictTableRepo repoDctTbl;


    @Override
    public void afterPropertiesSet() throws Exception {

    }

    public void install(ColumnOrientedTableDef def){
        if(def!=null){
            try {
                def.onInstall(this.repoDctTbl, this.repoDctFld);
            }catch(Throwable th){
                LogHelper.error(th);
            }
        }
    }


}
